package com.facebook.listener;

import android.app.Activity;
import android.os.Looper;
import android.widget.Toast;

import com.facebook.android.FacebookError;
import com.imoblife.brainwavestus.share.BaseRequestListener;

public class PhotoUploadListener extends BaseRequestListener{
	
	private Activity mActivity;
	
	public PhotoUploadListener(){	}
	
	public PhotoUploadListener(Activity activity){
		this.mActivity = activity;
	}
	
	public void onComplete(final String response, final Object state) {
		// mHandler.post(new Runnable() {
		// 
		// public void run() {
		// new UploadPhotoResultDialog(MainActivity.this,
		// "Upload Photo executed", response).show();
		// }
		// });
		Looper.prepare();
		Toast.makeText(mActivity, "��Ƭ�ϴ��ɹ���", Toast.LENGTH_SHORT)
				.show();
		Looper.loop();
	}

	public void onFacebookError(FacebookError error) {
		Toast.makeText(mActivity.getApplicationContext(),
				"Facebook Error: " + error.getMessage(), Toast.LENGTH_LONG)
				.show();
	}
}
